import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";
import HomeView from "../views/HomeView.vue";
import HomePage from "@/pages/HomePage.vue";
import userloginPage from "@/pages/user/userloginPage.vue";
import userregisterPage from "@/pages/user/userregisterPage.vue";
import userMangePage from "@/pages/admin/userMangePage.vue";

const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    name: "home",
    component: HomePage,
  },
  {
    path: "/user/login",
    name: "userlogin",
    component: userloginPage,
  },
  {
    path: "/user/register",
    name: "userregister",
    component: userregisterPage,
  },
  {
    path: "/admin/userMange",
    name: "userMange",
    component: userMangePage,
  },
];

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes,
});

export default router;
